package com.xcity.logupload.task.ftp;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class FtpUploadYesterdayTask extends FtpUploadTask {

	@Override
	public String getLocalFileName() {
		DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		Calendar cal = Calendar.getInstance();
		cal.add(Calendar.DAY_OF_YEAR, -1);
		return "server.log." + df.format(cal.getTime());
	}

	@Override
	public String getRemoteFileName() {
		return getLocalFileName();
	}
	
	
}
